package Command;

import Factory.AgriculturalMachine;

// 具体命令 - 停止作业命令
public class StopOperationCommand implements MachineCommand {
    private AgriculturalMachine machine;

    public StopOperationCommand(AgriculturalMachine machine) {
        this.machine = machine;
    }

    @Override
    public void execute() {
        machine.stop();
    }

    @Override
    public void undo() {
        machine.start();
    }
}